package cepicam.src.mvc;

import cepicam.src.controller.CtrlEleve;
import cepicam.src.model.ModelEleve;
import cepicam.src.view.PanelEleves;
import cepicam.src.view.PanelElevesAjouter;
import cepicam.src.view.PanelElevesLister;
import cepicam.src.view.PanelElevesOngletAchats;
import cepicam.src.view.PanelElevesOngletCours;
import cepicam.src.view.PanelElevesOngletDocuments;
import cepicam.src.view.PanelElevesOngletIdentite;
import cepicam.src.view.PanelElevesOngletNEW;
import cepicam.src.view.PanelElevesOngletPaiement;

public class ManagerMVCEleve {

	private PanelEleves vue;
	private PanelElevesLister plister;
	private PanelElevesAjouter pajouter;
	private PanelElevesOngletIdentite pidentite;
	private PanelElevesOngletNEW ponglet;
	
	private PanelElevesOngletAchats pachats;
	private PanelElevesOngletPaiement ppaiement;
	private PanelElevesOngletCours pcours;
	private PanelElevesOngletDocuments pdocuments;
	
	private CtrlEleve controlleur;
	private ModelEleve modele;

	
	
	public ManagerMVCEleve(){
		
		modele = new ModelEleve();
		controlleur = new CtrlEleve(modele);
		plister = new PanelElevesLister(modele, controlleur);
		controlleur.enregistrerVue(plister);
		pajouter = new PanelElevesAjouter(modele, controlleur);
		controlleur.enregistrerVue(pajouter);
		pidentite = new PanelElevesOngletIdentite(modele, controlleur);
		controlleur.enregistrerVue(pidentite);
		pachats = new PanelElevesOngletAchats();
		ppaiement = new PanelElevesOngletPaiement();
		pcours = new PanelElevesOngletCours();
		pdocuments = new PanelElevesOngletDocuments();
		ponglet=new PanelElevesOngletNEW(pidentite, pachats, ppaiement, pcours, pdocuments);
		vue = new PanelEleves(plister,pajouter, modele, controlleur, ponglet);
		controlleur.enregistrerVue(vue);
		
		
	}
	
	
	public PanelEleves getVue(){
		return vue;
	}
}
